
export type TLoginReq = {
  username: string,
  password: string
}


export type TUserModel = {
  id: number;
  userId: string;
  username: string;
  password: string;
  avatar: string;
  role: string;
  status: string;
  tag: string;
  createTime: Date;
}

export type TGroupModel = {
  id: number;
  groupId: string;
  userId: string;
  groupName: string;
  notice: string;
  createTime: Date;
}

export type TGroupMessage = {
  id: number;
  groupId: string;
  userId: string;
  content: string;
  messageType: string;
  creator: string;
  createTime: Date;
}

export type TFriendMessage = {
  id: number;
  friendId: string;
  userId: string;
  content: string;
  messageType: string;
  creator: string;
  createTime: Date;
}

export type TGroup = TGroupModel & { messages?: TGroupMessage[] }

export type TFriend = TUserModel & { messages?: TFriendMessage[] }

export type TAllData = {
  friendData: TFriend[],
  userData: TFriend[],
  groupData: TGroup[]
}


// export type TFriendMessageObj = {
//   toFriendMessage: TFriendMessage[],
//   exceptFriendMessage: TFriendMessage[]
// }

export type TUserMap = {
  userId: string,
  friendId: string
}

export type TFriendsListReq = {
  username: string,
  userId: string
}
